package com.zy.explore.design.patterns.singleton;

/**
 * 静态内部类单例
 *
 * @author ZY
 * @date 2021/11/03
 */
public class InnerClassSingleton {

    private static class InnerClassSingletonHolder {
        private static final InnerClassSingleton INSTANCE = new InnerClassSingleton();
    }

    private InnerClassSingleton() {
    }

    public static final InnerClassSingleton getInstance() {
        return InnerClassSingletonHolder.INSTANCE;
    }
}
